package com.dzsw.javabase.number;

import java.math.BigDecimal;

public class BigDecimalSample {

    public static void main(String[] args) {
        BigDecimal zero = new BigDecimal(0);

        BigDecimal one = zero;
        BigDecimal two = zero;
        one = one.add(new BigDecimal(10));
        System.out.println(one);
        System.out.println(zero);

        Long num1 = 100L;
        Long num2 = 3L;
        System.out.println(num1 / num2);

        BigDecimal three = new BigDecimal("3.315");
        System.out.println(three);

        BigDecimal four = new BigDecimal(3.15d);
        System.out.println(four);

        BigDecimal five = new BigDecimal(3.00d);
        System.out.println(five);
    }
}
